<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/lib/User.php';
$timTV = new User();
$listtimTV = $timTV->timThanhVien($UserName);
?>
<link href="admin.css" rel="stylesheet">
<div class="form">
    <form method="post" action="index.php?ava=list">
        <input name="txttimkiem" type="text" class="colortext"  value="Tìm kiếm tên tài khoản..." />
        <input type="submit" name="timkiem" value="GO">
    </form>
</div>
<div style="margin: 5px;padding: 30px;">
    <h2 style="color: #0000cc" align="center">Quản lý tài khoản</h2>
    <table style="width: 100%">
        <thead>
            <tr>
            	<th scope="col" align="left">ID</th>
                <th scope="col" align="left">Tên tài khoản</th>
                <th scope="col" align="left">Mật khẩu</th>
                <th scope="col" align="left">Họ</th>
                <th scope="col" align="left">Tên</th>
                <th scope="col" align="left">Email</th>
                <th scope="col" align="left">Giới tính</th>
                <th scope="col" align="left">Ngày sinh</th>
                <th scope="col" align="left">Nơi ở</th>
                <th scope="col" align="left">Điện thoại</th>
                <th scope="col" align="left">Loai User</th>
                <th scope="col"></th>
                <th scope="col"></th>
            </tr>
        </thead>
        <tbody>
                <?php while ($TV = mysql_fetch_assoc($listtimTV)): ?>
                <tr>
                    <td scope="col"><?php echo $TV['idUsers'] ?></td>
                    <td scope="col"><?php echo $TV['UserName'] ?></td>
                    <td scope="col"><?php echo $TV['Pass'] ?></td>
                    <td scope="col"><?php echo $TV['LastName'] ?></td>
                    <td scope="col"><?php echo $TV['FirstName'] ?></td>
                    <td scope="col"><?php echo $TV['Email'] ?></td>
                    <td scope="col"><?php echo $TV['Sex'] ?></td>
                    <td scope="col"><?php echo $TV['Birthday'] ?></td>
                    <td scope="col"><?php echo $TV['Location'] ?></td>
                    <td scope="col"><?php echo $TV['PhoneNum'] ?></td>
                    <td scope="col"><?php echo $TV['Loai_User'] ?></td>
                    <td scope="col"><?php echo "<a href='/admin/suathanhvien.php?command=edit&idUsers=".$TV['idUsers']."'>Sửa"; ?></td>
                    <td scope="col"><?php echo "<a href='/admin/index.php?command=del&idUsers=".$TV['idUsers']."'>Xóa"; ?></td>                     
                </tr>
                <?php endwhile; ?>
        </tbody>
        <tfoot>
            <tr>
                <th scope="row" colspan="13"><p style="color: #0099ff">.:ADMIN quản lý tài khoản:.</p></th>
        </tr>
        </tfoot>
    </table>
</div>
